from sqlalchemy import Column, Integer, String, Float
from database import Base

class TreeData(Base):
    __tablename__ = "tree_data"
    
    id = Column(Integer, primary_key=True, index=True)
    sample_id = Column(Integer, unique=True, index=True, nullable=False)
    inspection_type = Column(String, nullable=True)
    species = Column(String, nullable=True)
    diameter_2024 = Column(Float, nullable=True)
    diameter_2025 = Column(Float, nullable=True)
    azimuth = Column(Float, nullable=True)
    horizontal_distance = Column(Float, nullable=True)
    plot_azimuth = Column(Float, nullable=True)
    plot_horizontal_distance = Column(Float, nullable=True)
    x = Column(Float, nullable=True)
    y = Column(Float, nullable=True)
    note = Column(String, nullable=True)